<template>
  <div class="label-select">
    <div class="label">{{ label }}</div>
    <el-select v-model="value" v-bind="$attrs" v-on="$listeners">
      <el-option
        v-for="item in options"
        :key="item.value"
        :label="item.label"
        :value="item.value"
      >
      </el-option>
    </el-select>
  </div>
</template>

<script>
export default {
  name: "LabelSelect",
  props: {
    value: {
      type: String,
      default: "",
    },
    label: {
      type: String,
      default: "营业部",
    },
    options: {
      type: Array,
      default: () => [],
    },
  },
  computed: {
    month: {
      set(value) {
        this.$emit("input", value);
      },
      get() {
        return this.value;
      },
    },
  },
};
</script>

<style lang="less" scoped>
.label-select {
  display: flex;
  align-items: center;
  column-gap: 6px;
  .label {
    padding: 4px 5px;
    border-radius: 5px;
    background-color: #bf0000;
    color: #fff;
    font-size: 14px;
  }
}
</style>
